home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 102 / CD-ROM 102.iso / aplic / 2sync / 2SyncSetup.exe / focus / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2002-03-20  |  1.1 KB  |  39 lines

  1. function changefocus()
  2. {
  3.    var x = _level20._xmouse;
  4.    var y = _level20._ymouse;
  5.    check = _level20.rp.hitTest(x,y);
  6.    if(check eq true and _level0.focus ne "rp")
  7.    {
  8.       _root.setFocus("rp");
  9.    }
  10.    check = _level20.lp.hitTest(x,y);
  11.    if(check eq true and _level0.focus ne "lp")
  12.    {
  13.       _root.setFocus("lp");
  14.    }
  15. }
  16. function setfocus(panel)
  17. {
  18.    if(panel eq "rp")
  19.    {
  20.       notpanel = "lp";
  21.    }
  22.    else
  23.    {
  24.       notpanel = "rp";
  25.    }
  26.    _level15[notpanel + "_background"]._alpha = _level0.Data.notFocusAlpha;
  27.    _level15[panel + "_background"]._alpha = _level0.Data.FocusAlpha;
  28.    _level20[notpanel].pfill.colour.clear();
  29.    _level20[panel].pfill.colour.normal();
  30.    _level50.gotoAndStop("off");
  31.    call("_level15/" add notpanel add "/" add eval("_level0:" add notpanel add "_module") add "/codelib:save");
  32.    call("_level15/" add panel add "/" add eval("_level0:" add panel add "_module") add "/codelib:focus");
  33.    _level0.focus = panel;
  34.    fscommand("focus",eval("_level0:focus"));
  35.    call("_level0/lib:loadonfocus");
  36.    stop();
  37. }
  38. setfocus("rp");
  39.